﻿@{
        ViewBag.Title = "节点信息配置";
        Layout = "~/Views/Shared/_Form.cshtml";
}
@Html.AppendCssFile("/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.css")
<div style="position:relative;width:100%;height:100%;">
    <div class="lr-form-tabs" id="lr_form_tabs">
        <ul class="nav nav-tabs">
            <li class="active"><a data-value="baseInfo"><span class="lrlg">基本配置</span></a></li>
            <li><a data-value="auditor"><span class="lrlg">审核者</span></a></li>
            <li><a data-value="workform"><span class="lrlg">表单设置</span></a></li>
            <li><a data-value="timeout"><span class="lrlg">超时设置</span></a></li>
            <li><a data-value="btnSetting"><span class="lrlg">按钮设置</span></a></li>
            <li><a data-value="conditionField"><span class="lrlg">字段条件设置</span></a></li>
            <li><a data-value="conditionSqlDiv"><span class="lrlg">sql条件设置</span></a></li>

            <li><a data-value="operation"><span class="lrlg">绑定操作</span></a></li>
        </ul>
    </div>
    <div class="tab-content" id="tab_content">
        <div id="baseInfo" class="tab-pane  lr-form-wrap active">
            <div class="col-xs-12 lr-form-item">
                <div class="lr-form-item-title">节点标识<font face="宋体">*</font></div>
                <input id="id" type="text" readonly class="form-control" />
            </div>
            <div class="col-xs-12 lr-form-item">
                <div class="lr-form-item-title">节点名称<font face="宋体">*</font></div>
                <input id="name" type="text" class="form-control" placeholder="请输入名称" isvalid="yes" checkexpession="NotNull" readonly />
            </div>
            <div class="col-xs-12 lr-form-item div_notice div_hide">
                <div class="lr-form-item-title">通知策略</div>
                <div id="notice"></div>
            </div>

            <div class="col-xs-6 lr-form-item div_next div_hide">
                <div class="lr-form-item-title">下一节点审核人</div>
                <div class="radio lr-radio" type="lr-radio" id="isNext">
                    <label>
                        <input name="isNext" type="radio" value="1" />
                        <span class="lrlg">允许手动指定</span>
</label>
                    <label>
                        <input name="isNext" type="radio" value="2" checked="checked" />
                        <span class="lrlg">不允许手动指定</span>
</label>
                </div>
            </div>
            <div class="col-xs-6 lr-form-item div_next div_hide">
                <div class="lr-form-item-title">自定义标题</div>
                <div class="radio lr-radio" type="lr-radio" id="isTitle">
                    <label>
                        <input name="isTitle" type="radio" value="1" />
                        <span class="lrlg">允许</span>
</label>
                    <label>
                        <input name="isTitle" type="radio" value="2" checked="checked" />
                        <span class="lrlg">不允许</span>
</label>
                </div>
            </div>
            <div class="col-xs-6 lr-form-item div_auditor div_hide">
                <div class="lr-form-item-title">所有审核者</div>
                <div class="radio lr-radio" type="lr-radio" id="isAllAuditor">
                    <label>
                        <input name="isAllAuditor" type="radio" value="1" checked="checked" />
                        <span class="lrlg">只要其中一人审核</span>
</label>
                    <label>
                        <input name="isAllAuditor" type="radio" value="2" />
                        <span class="lrlg">都需要审核</span>
</label>
                </div>
            </div>

            <div class="col-xs-6 lr-form-item div_auditor_type div_hide">
                <div class="lr-form-item-title">审核执行策略</div>
                <div class="radio lr-radio" type="lr-radio" id="auditExecutType">
                    <label>
                        <input name="auditExecutType" type="radio" value="1" checked="checked" />
                        <span class="lrlg">有人不同意流转</span>
</label>
                    <label>
                        <input name="auditExecutType" type="radio" value="2" />
                        <span class="lrlg">所有人审核完</span>
</label>
                </div>
            </div>
            <div class="col-xs-6 lr-form-item div_auditor_type div_hide">
                <div class="lr-form-item-title">再次审核</div>
                <div class="radio lr-radio" type="lr-radio" id="auditorAgainType">
                    <label>
                        <input name="auditorAgainType" type="radio" value="1" checked="checked" />
                        <span class="lrlg">已通过不需要审核</span>
</label>
                    <label>
                        <input name="auditorAgainType" type="radio" value="2" />
                        <span class="lrlg">已通过需要审核</span>
</label>
                </div>
            </div>
            <div class="col-xs-6 lr-form-item div_auditor_type div_hide">
                <div class="lr-form-item-title">审核方式</div>
                <div class="radio lr-radio" type="lr-radio" id="auditorType">
                    <label>
                        <input name="auditorType" type="radio" value="1" checked="checked" />
                        <span class="lrlg">并行</span>
</label>
                    <label>
                        <input name="auditorType" type="radio" value="2" />
                        <span class="lrlg">串行</span>
</label>
                </div>
            </div>

            <div class="col-xs-12 lr-form-item div_sign div_hide">
                <div class="lr-form-item-title">允许加签</div>
                <div class="radio lr-radio" type="lr-radio" id="isSign">
                    <label>
                        <input name="isSign" type="radio" value="1" checked="checked" />
                        <span class="lrlg">是</span>
</label>
                    <label>
                        <input name="isSign" type="radio" value="2" />
                        <span class="lrlg">否</span>
</label>
                </div>
            </div>
            <div class="col-xs-12 lr-form-item div_batchAudit div_hide">
                <div class="lr-form-item-title">允许批量审核</div>
                <div class="radio lr-radio" type="lr-radio" id="isBatchAudit">
                    <label>
                        <input name="isBatchAudit" type="radio" value="1" />
                        <span class="lrlg">是</span>
</label>
                    <label>
                        <input name="isBatchAudit" type="radio" value="2" checked="checked" />
                        <span class="lrlg">否</span>
</label>
                </div>
            </div>

            <div class="col-xs-6 lr-form-item div_confluence div_hide">
                <div class="lr-form-item-title">会签策略<font face="宋体">*</font></div>
                <div id="confluenceType"></div>
            </div>
            <div class="col-xs-6 lr-form-item div_confluence div_hide">
                <div class="lr-form-item-title">会签比例</div>
                <input id="confluenceRate" type="text" class="form-control" value="100" />
            </div>

            <div class="col-xs-12 lr-form-item div_child div_hide">
                <div class="lr-form-item-title">子流程<font face="宋体">*</font></div>
                <div id="childFlow"></div>
            </div>
            <div class="col-xs-12 lr-form-item div_child div_hide">
                <div class="lr-form-item-title">子流程执行策略<font face="宋体">*</font></div>
                <div class="radio lr-radio" type="lr-radio" id="childType">
                    <label>
                        <input name="childType" type="radio" value="1" checked="checked" />
                        <span class="lrlg">同步</span>
</label>
                    <label>
                        <input name="childType" type="radio" value="2" />
                        <span class="lrlg">异步</span>
</label>
                </div>
            </div>
        </div>
        <div id="auditor" class="tab-pane" style="position:relative;padding:5px;width:100%;height:100%;">
            <div style="position:relative;width:100%;height:100%;border:1px solid #ddd;padding-bottom:30px;">
                <div class="lr-form-layout-body-title" style="top:auto;bottom:0;border-bottom:0px;border-top:1px solid #ddd;">
                    <div class="lr-form-jfgrid-btns">
                        <a id="lr_post_auditor" class="btn btn-success"><i class="fa fa-graduation-cap"></i>&nbsp;<span class="lrlg">添加岗位</span></a>
                        <a id="lr_role_auditor" class="btn btn-info"><i class="fa fa-paw"></i>&nbsp;<span class="lrlg">添加角色</span></a>
                        <a id="lr_level_auditor" class="btn btn-warning" style="display:none"><i class="fa fa-user"></i>&nbsp;<span class="lrlg">添加上下级</span></a>
                        <a id="lr_user_auditor" class="btn btn-primary"><i class="fa fa-user"></i>&nbsp;<span class="lrlg">添加用户</span></a>
                        <a id="lr_node_auditor" class="btn btn-warning"><i class="fa fa-user"></i>&nbsp;<span class="lrlg">添加节点执行人</span></a>
                        <a id="lr_form_auditor" class="btn btn-success"><i class="fa fa-user"></i>&nbsp;<span class="lrlg">添加表字段</span></a>

                        <a id="lr_delete_auditor" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;<span class="lrlg">移除</span></a>
                    </div>
                </div>
                <div id="auditor_girdtable"></div>
            </div>
        </div>
        <div id="workform" class="tab-pane" style="position:relative;padding:5px;width:100%;height:100%;">
            <div style="position:relative;width:100%;height:100%;border:1px solid #ddd;padding-bottom:30px;">
                <div class="lr-form-layout-body-title" style="top:auto;bottom:0;border-bottom:0px;border-top:1px solid #ddd;">
                    <div class="lr-form-jfgrid-btns">
                        <a id="lr_add_workform" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;<span class="lrlg">添加</span></a>
                        <a id="lr_edit_workform" class="btn btn-warning"><i class="fa fa-pencil-square-o"></i>&nbsp;<span class="lrlg">修改</span></a>
                        <a id="lr_delete_workform" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;<span class="lrlg">移除</span></a>
                    </div>
                </div>
                <div id="workform_girdtable"></div>
            </div>
        </div>
        <div id="timeout" class="tab-pane  lr-form-wrap active">
            <div class="col-xs-6 lr-form-item">
                <div class="lr-form-item-title">通知时间(时)</div>
                <input id="timeoutNotice" type="text" class="form-control" />
            </div>
            <div class="col-xs-6 lr-form-item">
                <div class="lr-form-item-title">通知间隔(时)</div>
                <input id="timeoutInterval" type="text" class="form-control" />
            </div>
            <div class="col-xs-6 lr-form-item">
                <div class="lr-form-item-title">通知策略</div>
                <div id="timeoutStrategy"></div>
            </div>
            <div class="col-xs-6 lr-form-item">
                <div class="lr-form-item-title">流转时间(时)</div>
                <input id="timeoutAction" type="text" class="form-control" />
            </div>
        </div>
        <div id="btnSetting" class="tab-pane" style="position:relative;padding:5px;width:100%;height:100%;">
            <div style="position:relative;width:100%;height:100%;border:1px solid #ddd;padding-bottom:30px;">
                <div id="btn_girdtable"></div>
                <div class="lr-form-layout-body-title" style="top:auto;bottom:0;border-bottom:0px;border-top:1px solid #ddd;">
                    <div class="lr-form-jfgrid-btns">
                        <a id="lr_add_btns" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;<span class="lrlg">添加</span></a>
                        <a id="lr_edit_btns" class="btn btn-warning"><i class="fa fa-pencil-square-o"></i>&nbsp;<span class="lrlg">修改</span></a>
                        <a id="lr_delete_btns" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;<span class="lrlg">移除</span></a>
                    </div>
                </div>
            </div>
        </div>
        <div id="conditionField" class="tab-pane" style="position:relative;padding:5px;width:100%;height:100%;">
            <div style="position:relative;width:100%;height:100%;border:1px solid #ddd;padding-bottom:30px;">
                <div class="lr-form-layout-body-title" style="top:auto;bottom:0;border-bottom:0px;border-top:1px solid #ddd;">
                    <div class="lr-form-jfgrid-btns">
                        <a id="lr_add_condition" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;<span class="lrlg">添加</span></a>
                        <a id="lr_edit_condition" class="btn btn-warning"><i class="fa fa-pencil-square-o"></i>&nbsp;<span class="lrlg">修改</span></a>
                        <a id="lr_delete_condition" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;<span class="lrlg">移除</span></a>
                    </div>
                </div>
                <div id="condition_girdtable"></div>
            </div>
        </div>
        <div id="conditionSqlDiv" class="tab-pane" style="position:relative;width:100%;height:100%;padding-top:70px;">
            <div style="position:absolute;height:66px;width:100%;padding:5px;top:0;left:0;">
                <div class="alert alert-danger" style="position:relative;text-align: left;margin:0;">
                    <i class="fa fa-question-circle alert-dismissible" style="position: relative; top: 1px; font-size: 15px; padding-right: 5px;"></i>
                    <span class="lrlg">注意：请在开发人员指导下进行配置SQL语句（{processId}流程发起实例主键{userId}用户Id{userAccount}用户账号{companyId}用户公司{departmentId}用户部门）！</span>
</div>
            </div>
            <div class="lr-form-wrap" style="padding:5px;padding-top:40px;">
                <div style="position:absolute;left:0;top:5px;width:100%;height:28px;padding:0 5px;"><div id="dbConditionId" style="position:relative;width:100%;height:100%;"></div></div>
                <textarea id="conditionSql" class="form-control" style="height: 100%" placeholder="请填写Sql语句"></textarea>
            </div>
        </div>
        <div id="operation" class="tab-pane" style="position:relative;width:100%;height:100%;padding:5px;">
            <div style="position:relative;border:1px solid #ccc;width:100%;height:100%;padding-top:39px;">
                <div id="operationTypeDiv" style="position:absolute;top:0;left:0;width:100%;height:39px;border-bottom:1px solid #ccc;">
                    <div class="col-xs-12 lr-form-item">
                        <div class="lr-form-item-title">操作类型</div>
                        <div class="radio lr-radio" type="lr-radio" id="operationType">
                            <label>
                                <input name="operationType" type="radio" value="sql" checked="checked" />
                                <span class="lrlg">sql</span>
</label>
                            <label>
                                <input name="operationType" type="radio" value="interface" />
                                <span class="lrlg">接口</span>
</label>
                            <label>
                                <input name="operationType" type="radio" value="ioc" />
                                <span class="lrlg">依赖注入方法</span>
</label>
                        </div>
                    </div>
                </div>
                <div style="position:relative;width:100%;height:100%;">
                    <div id="sql" class="operationDiv" style="position:relative;width:100%;height:100%;padding-top:73px;">
                        <div style="position:absolute;height:66px;width:100%;padding:5px;top:0;left:0;">
                            <div class="alert alert-danger" style="position:relative;text-align: left;margin:0;">
                                <i class="fa fa-question-circle alert-dismissible" style="position: relative; top: 1px; font-size: 15px; padding-right: 5px;"></i>
                                <span class="lrlg">注意：请在开发人员指导下进行配置SQL语句（{processId}流程发起实例主键{userId}用户Id{userAccount}用户账号{companyId}用户公司{departmentId}用户部门{childProcessId}子流程进程主键）！</span>
</div>
                        </div>
                        <div class="lr-form-wrap" style="padding:5px;padding-top:40px;">
                            <div style="position:absolute;left:0;top:5px;width:100%;height:28px;padding:0 5px;"><div id="dbId" style="position:relative;width:100%;height:100%;"></div></div>
                            <textarea id="strSql" class="form-control" style="height: 100%" placeholder="请填写Sql语句"></textarea>
                        </div>
                    </div>
                    <div id="interface" class="operationDiv" style="position:relative;width:100%;height:100%;display:none;padding-top:90px;">
                        <div style="position:absolute;height:54px;width:100%;padding:5px;top:0;left:0;">
                            <div class="alert alert-danger" style="position:relative;text-align: left;margin:0;">
                                <i class="fa fa-question-circle alert-dismissible" style="position: relative; top: 1px; font-size: 15px; padding-right: 5px;"></i>
                                <span class="lrlg">注意：必须要开发人员指导下进行配置支持Post方法的接口,json数据格式。{processId:'流程发起实例主键',userId:'用户Id',userAccount:'用户账号',companyId:'用户公司',departmentId:'用户部门',childProcessId:'子流程进程主键'}(或咨询售后人员)！</span>
</div>
                        </div>
                        <div class="lr-form-wrap" style="padding:5px;">
                            <textarea id="strInterface" class="form-control" placeholder="请填写接口地址" style="height: 100%"></textarea>
                        </div>

                    </div>
                    <div id="ioc" class="operationDiv" style="position:relative;width:100%;height:100%;display:none;padding-top:54px;">
                        <div style="position:absolute;height:54px;width:100%;padding:5px;top:0;left:0;">
                            <div class="alert alert-danger" style="position:relative;text-align: left;margin:0;">
                                <i class="fa fa-question-circle alert-dismissible" style="position: relative; top: 1px; font-size: 15px; padding-right: 5px;"></i>
                                <span class="lrlg">注意：必须要开发人员指导下进行配置注册的IOC方法名(或咨询售后人员)！</span>
</div>
                        </div>
                        <div class="lr-form-wrap" style="padding:5px;">
                            <textarea id="iocName" class="form-control" placeholder="请填写方法名" style="height: 100%"></textarea>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js")